/*
 * @Author: Jimmy
 * @LastModifiedBy: Jimmy
 * @Date: 2024-02-24 13:19:49
 * @LastEditTime: 2024-06-30 12:25:44
 * @FilePath: /nest_study/web/src/views/error/index.tsx
 */
import { Button, Result } from 'antd'
import { useNavigate } from 'react-router-dom'
import { getCache } from '@/utils/storage'

export default function NotFound() {
    let homeRoute = getCache('home');
    const navigate = useNavigate();
    const goBack = () => {
        navigate(homeRoute.redirect || homeRoute.path)
    }
    return (
        <div>
            <Result
                status='403'
                title="Loading"
                subTitle="加载页面...."
                extra={<Button type='primary' onClick={goBack}>返回首页</Button>}
            />
        </div>
    )
}
